package cn.woniu.ecommerceplatform.util;


import java.rmi.ServerException;

public enum ResultEnum {
    /**
     * 操作成功
     */
    SUCESS(200,"操作成功"),
    /**
     * 登陆失败
     */
    FAILURE(406,"登陆失败"),
    /**
     * 未登录
     */
    NOLOGIN(406, "未登录，请先登录"),
    /**
     * 权限不足
     */
    NOAUTH(403,"无权操作，请联系管理员"),
    /**
     * 退出成功
     */
    LOGOUT(206,"退出成功"),
    /**
     * 查询为空
     */
    ISNULL(404,"未查到任何结果"),

    NOTOK(202,"操作失败"),

    ServerException(500,"服务器异常")


    ;
    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    ResultEnum() {
    }

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "ResultEnum{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }

}
